package org.amos.api.upms.feign;

import io.swagger.v3.oas.annotations.Operation;
import org.amos.api.upms.dto.DictDetailDTO;
import org.amos.core.basic.vo.R;
import org.amos.feign.constants.FeignConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = FeignConstant.UPMS)
public interface IDictFeignClient {
    String API_PREFIX = "/system/dict";

    @GetMapping(API_PREFIX + "/getList")
    @Operation(description = "字典数据列表(字典详情)")
    R<List<DictDetailDTO>> getList(@RequestParam("code") String code);

    @GetMapping(API_PREFIX + "/getValue")
    @Operation(description = "字典数据值(字典详情)")
    R<String> getValue(@RequestParam("code") String code, @RequestParam("key") String key);

}
